import React from 'react'
export default class FilmItem extends React.Component{
    render(){
        let {poster,name,filmId,synopsis,category}=this.props
        let imgStyle={
            float:'left',
            width:'120px'
        }
        return(
            <div>
                {
                    <div style={{overflow:'hidden',marginBottom:'10px'}} key={filmId} onClick={()=>{
                        this.props.handlePick(synopsis)
                    }}>
                        <img src={poster} style={{...imgStyle}} alt={name}/>
                        <div>
                            <h3>{name}</h3>
                            <span>类型：{category}</span>
                        </div>
                    </div>    
                }
            </div>
        )
    }
} 